package com.galaxy.device.domain.bo;

import com.galaxy.common.core.validate.AddGroup;
import com.galaxy.common.core.validate.EditGroup;
import com.galaxy.common.mybatis.core.domain.BaseEntity;
import com.galaxy.device.domain.DeviceMaintenance;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

/**
 * 设备维护业务对象
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = DeviceMaintenance.class)
public class DeviceMaintenanceBo extends BaseEntity {

    /**
     * 主键ID
     */
    @NotNull(message = "主键不能为空", groups = {EditGroup.class})
    private Long id;

    /**
     * 设备ID
     */
    @NotNull(message = "设备ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long deviceId;

    /**
     * 维护人员ID
     */
//    @NotNull(message = "维护人员ID不能为空", groups = {AddGroup.class, EditGroup.class})
    private Long userId;

    /**
     * 维护单号
     */
    @NotBlank(message = "维护单号不能为空", groups = {AddGroup.class, EditGroup.class})
    private String maintenanceNo;

    /**
     * 维护类型(1:定期维护,2:故障维修,3:紧急维护)
     */
    @NotNull(message = "维护类型不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer maintenanceType;

    /**
     * 状态(0:待维护,1:维护中,2:已完成)
     */
    @NotNull(message = "状态不能为空", groups = {AddGroup.class, EditGroup.class})
    private Integer status;

    /**
     * 维护描述
     */
    private String description;

    /**
     * 开始时间
     */
    private Date startTime;

    /**
     * 结束时间
     */
    private Date endTime;

    /**
     * 维护结果
     */
    private String result;


    private String remark;


    /**
     * 状态名称
     */
    private String statusName;

    /**
     * 维护类型名称
     */
    private String maintenanceTypeName;

    /**
     * 维护人员姓名
     */
    private String userName;

    /**
     * 设备名称
     */
    private String deviceName;
}
